<template>
  <van-stepper integer :min="0" v-model="val" @change="updata" :class="{active:val}"/>
</template>

<style lang='stylus'  rel='stylesheet/stylus'>
  .active input
      background:#91e2b8
</style>
<script>
import Vue from "vue"
import { Stepper } from 'vant'
Vue.use(Stepper)
export default {
    data() {
    return {
      val: 0
    }
  },
  methods:{
      updata(v){
        this.val = v
          this.$store.commit('Changeselected',{goods:this.goods,category:this.category,num:this.val})
      }
  },
  props:{
      goods:Object,
      category:String
  }
}

</script>